<?php
$this->breadcrumbs=array(
	'Classes'=>array('index'),
	'Sub Classes',
);
$this->menu=array(
	array('label'=>'Create Class', 'url'=>array('create',"id"=>1)),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('classes-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Sub-Classes for <?php echo $mclass?></h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'classes-grid',
	'cssFile' => Yii::app()->theme->baseUrl . '/css/gridView.css',
	'pager'=>array('cssFile'=>false, 'class'=>'CLinkPager'),
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'name',
		array(
            'name'=>'activated',
            'value'=>'$data->activated?Yii::t("App","Yes"):Yii::t("App","No")',
            'filter'=>array('0'=>Yii::t("App","No"),'1'=>Yii::t("App","Yes")),
            'htmlOptions'=>array('style'=>'text-align:center;width:80px'),
        ),
		array(
			'class'=>'CButtonColumn',
			'template'=>'{delete}{update}',
		),
	),
)); ?>
